//
//  HYBaseHandler.m
//  Around
//
//  Created by 华谕 on 2017/6/13.
//  Copyright © 2017年 HUYU. All rights reserved.
//

#import "HYBaseHandler.h"

@implementation HYBaseHandler

//注册请求验证码/user/code4register
+ (void)requestCodeRegisterParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_CodeRegister params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//忘记密码 验证码 /worker/user/getUpdatePswCode
+ (void)requestGetUpdatePswCodeParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_getUpdatePswCode params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//提现密码 验证码 /worker/user/getUpdateWithdrawPswCode
+ (void)requestGetUpdateWithdrawPswCodeParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_drawPswCode params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//用户注册
+ (void)requestRegisterParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_Register params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//登录/c/userLogin/login
+ (void)requestUserLoginParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_UserLogin params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//用户信息
+ (void)requestGetUserInfoParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_userInfo params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//简历信息
+ (void)requestGetWorkerInfoParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_workerInfo params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//保存用户信息 /worker/user/save
+ (void)requestUpdateInfoParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_updateInfo params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}


//地区/c/area/findAll
+ (void)requestAreaParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_areaList params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//保存用户简历 /worker/worker/save
+ (void)requestUpdateWorkerInfoParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_uploadWorker params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//公钥 /c/rsaKey/publicKey
+ (void)requestPublicKeyParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_PublicKey params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//工种 /worker/work/findAll
+ (void)requestWorkTypeParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_workerType params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//保存工作经历 /worker/experience/save
+ (void)requestExperienceSaveParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_experienceSave params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//退出登录 /c/userLogin/logout
+ (void)requestUserLogoutParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_UserLogout params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//实名认证 /worker/identity/save
+ (void)requestIdentityParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_Identity params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//钱包余额 /worker/wallet/mine
+ (void)requestMineWalletParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_mineWallet params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//钱包明细 
+ (void)requestWalletTransactionParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_transaction params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//热门城市
+ (void)requestHotCityParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_HotAreaCity params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//城市列表
+ (void)requestCityParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_AllCityLiat params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//银行卡列表 /c/bankCard/findAll
+ (void)requestBankCarListParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_BankCarList params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//银行列表 /c/bank/findAll
+ (void)requestBankListParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_BankList params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//添加银行卡 /c/bankCard/add
+ (void)requestAddBankCarParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_AddBankCar params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//解绑银行卡 /worker/bankCard/delete
+ (void)requestBankCarddeleteParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_BankCardDelete params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//添加银行卡请求验证码 /worker/bankCard/getCode
+ (void)requestCodeBankCardParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_CodeBankCard params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//忘记密码
+ (void)requestUpdatePswParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_updatePsw params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//设置提现密码 /worker/user/updateWithdrawPsw
+ (void)requestupdateWithdrawPswParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_updatedrawPsw params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//提现  /worker/withdraw/add
+ (void)requestWithdrawAddParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_DrawAdd params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//是否设置了提现密码  /worker/withdraw/passwordSetting
+ (void)requestPasswordSettingParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_passwordSetting params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//项目订单列表  /worker/project/mine
+ (void)requestProjectListParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_projectLise params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//评价列表 /worker/evaluate/page
+ (void)requestEvaluateListParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_EvaluateLise params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//消息反馈 /c/msgFeedback/save
+ (void)requestmsgFeedbackParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_Feedbacksave params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//关于我们 /worker/systemConfig/companyIntro
+ (void)requestAboutUsParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_AboutUs params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//客服电话
+ (void)requestkefuPhoneParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_kefuPhone params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//帮助中心 /worker/help/findAll
+ (void)requestHelpAllParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_helpAll params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//日报列表 /worker/daily/page
+ (void)requestWorkerDailyParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_dailyList params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//添加日报 /worker/daily/save
+ (void)requestWorkerSaveDailyParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_dailySave params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//员工列表 /worker/project/page
+ (void)requestWorkerPeopleListParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_workerPeople params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

// 我的空闲日期 /worker/workerFreeDate/mine
+ (void)requestWorkerFreeDateParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_workerFreeDate params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

// 保存空闲日期 /worker/workerFreeDate/save
+ (void)requestSaveWorkerFreeDateParmers:(NSArray *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_SaveFreeDate params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//考勤保存 /worker/attendance/save
+ (void)requestSaveAttendanceParmers:(NSArray *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_SaveAttendance params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//我的考勤列表 /worker/attendance/mine
+ (void)requestMyAttendanceParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_MyAttendList params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//支付
+ (void)requestPayParmers:(NSDictionary *)parmers PayType:(NSInteger)payType Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    NSString *url = @"/worker/wxpay/pay";
    if (payType == 1)
    {
        url = @"/worker/alipay/pay";
    }
    [HttpTool postWithPath:url params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//我的收藏 /worker/collect/mine
+ (void)requestMyCollectParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_Mycollect params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//地图找工厂 /worker/contractor/map
+ (void)requestContractorMapParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_ContractorMap params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//工厂详情 /worker/contractor/select
+ (void)requestContractorDetailParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_ContractorDetail params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//招工告示 /worker/project/page
+ (void)requestRecruitmentNoticeParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_WorkerNotice params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//查看项目详情 /worker/project/select
+ (void)requestProjectSelectParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_projectSelect params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//收藏，取消收藏 /worker/collect/addOrRemove
+ (void)requestCollectAddOrRemoveParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_collectAddOrRemove params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//雇主 /worker/employer/select
+ (void)requestEmployerSelectParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_EmployerSelect params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//评价 /worker/evaluate/save
+ (void)requestEvaluateSaveParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:SERVER_EvaluateSave params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//报名 SERVER_recomAdd
+ (void)requestRecommendAddParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_recomAdd params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//消息
+ (void)requestMessageMineParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_messageList params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//协议
+ (void)requestGetRegistAgreeMentParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_Agreement params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//通知
+ (void)requestMessageInitParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_MessageInit params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//通知Test
+ (void)requestMessageTestParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_MessageTest params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//通用表单
+ (void)requestWithTheFormUrl:(NSString *)url Parmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:url params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}



//通用Json
+ (void)requestWithJsonUrl:(NSString *)url Parmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPathJson:url params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//查看项目详情
+ (void)requestMessageProjectParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_MessageProject params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}


//接受消息
+ (void)requestQuotationAcceptParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_QuotationAccept params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//拒绝消息
+ (void)requestQuotationRefuseParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_QuotationRefuse params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

//消息是否未读
+ (void)requestMessageIsReadParmers:(NSDictionary *)parmers Success:(SuccessBlock)success failed:(FailedBlock)failed
{
    [HttpTool postWithPath:SERVER_MessageIsRead params:parmers success:^(id json) {
        success(json);
    } failure:^(NSError *error) {
        failed(error);
        
    }];
}

@end
